@@ -64,7 +64,7 @@ module Agents |
||
64 | 64 |
errors.add(:base, "expected_update_period_in_days is required") unless options['expected_update_period_in_days'].present? |
65 | 65 |
|
66 | 66 |
if options[:starting_at].present? |
67 |
- Time.parse(options[:starting_at]) rescue errors.add(:base, "Error parsing starting_at") |
|
67 |
+ Time.parse(interpolated[:starting_at]) rescue errors.add(:base, "Error parsing starting_at") |
|
68 | 68 |
end |
69 | 69 |
end |
70 | 70 |
|
@@ -77,11 +77,7 @@ module Agents |
||
77 | 77 |
end |
78 | 78 |
|
79 | 79 |
def max_results |
80 |
- if interpolated['max_results'].present? |
|
81 |
- interpolated['max_results'].to_i |
|
82 |
- else |
|
83 |
- 500 |
|
84 |
- end |
|
80 |
+ (interpolated['max_results'].presence || 500).to_i |
|
85 | 81 |
end |
86 | 82 |
|
87 | 83 |
def check |
@@ -9,11 +9,7 @@ describe Agents::TwitterSearchAgent do |
||
9 | 9 |
search: "freebandnames", |
10 | 10 |
expected_update_period_in_days: "2", |
11 | 11 |
starting_at: "Jan 01 00:00:01 +0000 2000", |
12 |
- max_results: '3', |
|
13 |
- consumer_key: "---", |
|
14 |
- consumer_secret: "---", |
|
15 |
- oauth_token: "---", |
|
16 |
- oauth_token_secret: "---" |
|
12 |
+ max_results: '3' |
|
17 | 13 |
} |
18 | 14 |
|
19 | 15 |
end |